package Java8.groupingby;

import com.google.common.collect.Lists;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test {


  public static void main(String[] args) throws FileNotFoundException {
    Map<String, Long> freq;
    File file = new File("/Users/dingjianfeng/test.lua");

    Stream<String> words = Stream.of("1", "2", "3", "1");

    freq = words.collect(Collectors.groupingBy(String::toLowerCase, Collectors.counting()));

    System.out.println(freq);

  }
}
